﻿using System;
using System.Configuration;

namespace AppFx.BizTalk.Diagnostics.Telemetry
{
    public class TelemetryClientElement : ConfigurationElement
    {
        /// <summary>
        /// The key/name for the sender configuration
        /// </summary>
        [ConfigurationProperty("name", IsRequired = true, IsKey = true)]
        public string Name
        {
            get { return (string)this[@"name"]; }
        }
        /// <summary>
        /// The key for application insights
        /// </summary>
        /// <remarks>        
        /// </remarks>
        [ConfigurationProperty("telemetryKey", IsRequired = true)]
        public string TelemetryKey
        {
            get { return (string)this[@"telemetryKey"]; }
        }
        /// <summary>
        /// Is the client enabled
        /// </summary>
        [ConfigurationProperty("disableTelemetry", IsRequired = true)]
        public bool DisableTelemetry
        {
            get { return Convert.ToBoolean(this[@"disableTelemetry"]); }
        }       
    }
}

